package cn.tiger.starter.easyExcel;

import cn.tiger.entity.RowModel.UserExcelProperty;
import cn.tiger.entity.User;
import cn.tiger.utils.ExcelUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @Author ： ZAG WELL
 * @Date : 2021/5/5
 */
public class EasyExcelExport2 {
    public static ArrayList<User> users = new ArrayList<>();

    static {
        User user = new User();
        user.setAccount("aaa");
        user.setUser("11");
        user.setPassword("123123");
        users.add(user);

        User user1 = new User();
        user1.setAccount("bbb");
        user1.setUser("222");
        user1.setPassword("123123");
        users.add(user1);

        User user2 = new User();
        user2.setAccount("ccc");
        user2.setUser("333");
        user2.setPassword("123123");
        users.add(user2);
    }
    public static void main(String[] args) {
        String filePath = "C:\\Users\\ZAG WELL\\Desktop\\测试导出导出\\easyExcelExport.xlsx";
        ExcelUtil.writeWithTemplate(filePath,users);
    }
}
